@extends('layout.home')
@section('content')


 
    <!-- <eleme-sidebar ng-hide="layoutState && layoutState.hideSidebar"></eleme-sidebar> -->
    <!-- <div ng-view role="main"></div> -->
    <!-- 地址栏 -->
    <div class="container clearfix ng-scope">
        <!-- <div class="location" ng-style="{visibility: geohash ? '' : 'hidden'}" role="navigation" location="" ng-if="geohash"> -->
        <br><span>当前位置:<a href="/fpage">更改位置信息</a></span><br><br>
        <!-- <span class="location-current">
                <a class="inherit ng-binding" ng-href="/place/wx4eyv2e1qf" ubt-click="401" ng-bind="place.name || place.address" href="/place/wx4eyv2e1qf">昌平区回龙观村东区(龙域中街南70米)</a>
            </span>
            <span class="location-change" ng-class="{ 'location-hashistory': user.username && userPlaces && userPlaces.length > 0 }">
                <a ng-href="/home" ubt-click="400" hardjump="" href="/home">[切换地址]</a>
                <ul class="dropbox location-dropbox" ubt-visit="398">
                    <li class="arrow"></li>
                    <li class="changelocation">
                        <a ng-href="/home" hardjump="" href="/home">
                            修改收货地址
                            <span class="icon-location"></span>
                        </a>
                    </li>
                </ul>
            </span>
            <span ng-transclude="">
                <i class="icon-arrow-right ng-scope"></i>
                <span class="ng-scope">服务中心</span>
            </span>-->
    </div>
    </div>
    <div class="container ng-scope" ng-show="!recentBoughtOnly">
        <div class="excavator container">
            <div  class="excavator-filter ng-scope">
                <span >商家分类:</span>

                <a  id="cid" class="excavator-filter-item ng-binding ng-scope active" href="javascript:">全部商家</a>
                @foreach($tops as $top)
                <a onclick="dd()"  class="excavator-filter-item ng-binding ng-scope aaa" sss="{{$top->cat_id}}"  href="javascript:" >{{$top->cat_name}}</a>
               <p id="aa" style="display:none;">{{$top->cat_id}}</p>
                
                 @endforeach   
            </div>
            <div id="pp" class="excavator-filter ng-scope">
                <a class="excavator-filter-item ng-binding ng-scope active" href="javascript:">全部</a> 
            </div>
            <script>
                $(".aaa").bind('click',function() {
                    var  asd = $(this).attr('sss');
                    $.ajaxSetup({
                    headers: { 'X-CSRF-TOKEN' : '{{ csrf_token() }}' }
                });
       
                   
                  $.ajax({
                        type: "POST",
                        url : "{{url('/asd')}}",
                  
                        data: {asd},
                        success: function(data){
                          
                          $("#pp").empty();
                          $("#pp").append('<a class="excavator-filter-item ng-binding ng-scope active" href="javascript:">全部</a>');
                          for(var i=0;i<data.length;i++){
                           
                            var ee='<a  id="bid" class="excavator-filter-item ng-binding ng-scope"  href="">'+data[i]+'</a>';
                             $("#pp").append(ee);
                          }
                        }
                     });

                  
                 });   
            </script>
        </div>
        <div class="place-rstbox clearfix">
            <div class="clearfix" data="filteredRestaurants = (rstStream.restaurants | filter: rstStream.filter | filter: otherFilter | orderBy: [ '-is_opening', rstStream.orderBy || 'index' ])" style="height: 1600px;">

                


          @foreach($sogos as $dat)
                <a class="rstblock" href="/shopp/{{$dat->id}}" data-rst-id="152185819" data-bidding="" target="_blank">

                    <div class="rstblock-logo">
                        <img class="rstblock-logo-icon" src="{{$dat->photo}}" alt="麻小外卖（上地店）" width="70" height="70">
                        <span> </span>
                    </div>
                    <div class="rstblock-content">
                        <div class="rstblock-title">{{$dat->name}}</div>
                        <div class="starrating icon-star">
                            <span class="icon-star" style="width:86%;"></span>
                        </div>
                        <span class="rstblock-monthsales">{{$dat->order}}</span>
                        <div class="rstblock-cost">配送费¥20</div>
                        <div class="rstblock-activity"></div>
                    </div>
                </a>

                

             
            @endforeach

                
                
                
            </div>
            
           
           
@endsection